This invention relates to the execution of do loops in programmable machines.
Do loops, i.e., sequences of program steps which must be repeated, are typically effected in software by providing a set-up step specifying the number of repetitions required ("I") followed by the sequence of loop steps including the two steps of first determining the number of iterations remaining (by updating I to I-1) and then either returning to perform another iteration (if I is greater than 0) or exiting from the loop (if I=0). These two steps must be performed as part of each iteration and, if the number of iterations is large, the processing time devoted to such wasteful "overhead" can be significant. The "overhead" time can be reduced by reserving one flag bit of the instruction for each step to indicate whether or not the step is the final step, and checking that bit before each instruction is executed. This arrangement also causes wasteful "overhead" in the extra instruction bit required.